<?php
allowCors();
if (!methodsRequired(['get'])) return;
if (!checkAdmin($msg)) return;

if (isset($_REQUEST['gp_id'])) {
    $group = new Group();
    if($db->query($group, ["name" => "gp_id", "value" => $_REQUEST['gp_id']])){
        $msg->data = json_decode($group->__toString());;
    }else{
        $msg->setCode(4);
    }

}else{
    $msg->setCode(4);
}

echo $msg;
